package demo.generate.Demo_ChangeMethod;

import com.sun.xml.internal.ws.org.objectweb.asm.MethodAdapter;
import com.sun.xml.internal.ws.org.objectweb.asm.MethodVisitor;
import demo.generate.Demo_ChangeMethod.SecurityChecker;
import jdk.internal.org.objectweb.asm.Type;
import org.objectweb.asm.Opcodes;

/**
 * Created by zhangyanfei on 2018/10/17.
 *
 * @author zhangyanfei
 * @date 2018/10/17
 */
public class SecurityCheckMethodAdpter extends MethodAdapter {
    public SecurityCheckMethodAdpter(MethodVisitor mv) {
        super(mv);
    }

    @Override
    public void visitCode() {
        visitMethodInsn(Opcodes.INVOKESTATIC, Type.getDescriptor(SecurityChecker.class),
            "checkSecurity", "()V");
    }
}
